﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using System.Web.Security;
using System.Web.SessionState;
using System.Web.Http;
using System.Data.Entity;
using Loyalty.Application;
using StructureMap;
using Loyalty.UI.DependencyResolution;
using System.Web.Http.Dispatcher;
using Loyalty.UI.App_Start;


namespace Loyalty.UI
{
    public class Global : HttpApplication
    {
        protected void Application_Start(object sender, EventArgs e)
        {

            Database.SetInitializer(new MigrateDatabaseToLatestVersion<LoyaltyContext, Application.Migrations.Configuration>());
            MvcHandler.DisableMvcResponseHeader = true;
            
            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            RouteConfig.RegisterRoutes(RouteTable.Routes);



        }

        private void Application_EndRequest(object sender, EventArgs e)
        {
            
        }
    }
}